import request from '@/utils/request'

let baseUrl = "/base/admin/problemType"
/**
 * 查询分页
 * @param query
 * @returns {AxiosPromise}
 */
export function list(query) {
  return request({
    url: `${baseUrl}/list`,
    method: 'get',
    params: query
  })
}


export function saveOrUpdateProblemType(data) {
  return request({
    url: `${baseUrl}/saveOrUpdate`,
    method: 'post',
    data: data
  })
}
export function delProblemType(typeIds) {
  return request({
    url: `${baseUrl}/delete`,
    method: 'delete',
    data:typeIds
  })
}

export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: `${baseUrl}/disabled`,
    method: 'put',
    data: data
  })
}

